
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Prime Resort  |  Packages </title>
        <meta name="description" content="Description Comes here" />
        <meta name="keywords" content="Place Keywords here" />
        <link rel="stylesheet" type="text/css" href="css/reset.css"/>
        <link rel="stylesheet" type="text/css" href="css/960_24_col.css"/>
        <link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/>
        <link rel="stylesheet" type="text/css" href="css/nivo-slider.css" media="screen"/>
        <script src="js/jquery-1.8.2.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.20.custom.min.js"></script>




        <script type="text/javascript">
            var idealsize;
            var pid,price;
            var pnm;
            var checkindate;
            var checkoutdate;
            var duration;
            function countProperties(obj) {
                var prop;
                var propCount = 0;

                for (prop in obj) {
                    propCount++;
                }
                return propCount;
            }
            
            
            
    
            $(document).ready(function(){
                
                $.post("CheckIfLogin",function(data){
                    
                    if(data==0)
                    {
                        // this means he is not logged in
                        var output="<ul><li><a href=\"#loginsection\" id=\"loginbutton\" class=\"login-logout\">Login</a></li> </ul>";
                        $("#loginLogout").html(output);
                    }
                    else{
                        var output="<ul><li><a href=\"#\">Edit Profile</a></li><li><a href=\"#\">Change Password</a></li><li> <a href=\"#logoutsection\" id=\"logoutbutton\" class=\"login-logout\" >Logout</a></li></ul>";
                        $("#loginLogout").html(output);
                    }
                });
                
                if(window.location.hash)
                {
                    var hashvalue=window.location.hash;
                    //alert(hashvalue);
                    if(hashvalue=="#loginpage")
                    {
                        $("#contents").load("login.jsp #loginsection");
                    }else if(hashvalue=="#loginsection")
                    {
                        document.getElementById("homepageslider").style.display="none";
                        $("#contents").load("login.jsp #loginsection");
                    }else if(hashvalue=="#viewevents")
                    {
                            
                        $("#contents").load("event-list.jsp");
                    
                        $.post("ViewEventServletClient",function(data){
                        
                            var result=$.parseJSON(data);
                            var count=countProperties(result);
                        
                            var output;
                            output+="<div class=\"resort-list\">";
                            output+="<h2 class=\"title\">Upcoming Events</h2><ul class=\"resort\">";
                        
                            for(var i=0;i<count;i++)
                            {
                                output+="<li>";
                                output+="<div class=\"event-heading\" id=\"eventbookingdiv\"><h3>"+result[i].eventname+"</h3><a href=\"#clienteventbooking\" class=\"book-now\" onclick=bookEvent("+result[i].eventid+")>Buy Passes Now</a><div class=\"clearfix\"></div></div>";
                                
                                output+="<div class=\"grid_3 omega\"><p><img src=\"siteimages/"+result[i].eventname+"_"+result[i].imagepath+"\" height=70 width=70 alt=\"resort-image\" /></p></div>";
                                
                                output+="<div class=\"grid_13 alpha resort-details\">";
                                output+="<h4 class=\"alignright\">Date : "+result[i].eventdate+"</h4> <h4 class=\"alignleft\">Venue : "+result[i].eventplace+" </h4><br/><br/>";
                                output+="<div class=\"clearfix\"></div>";
                                output+="<p>"+result[i].eventdescription+"</p>";
                                output+="</div>";
                                
                                output+="</li>";
                            }
                            output+="</ul></div>";
                        
                            $("#clientvieweventlist").html(output);
                        });
                    }else if(hashvalue=="#aboutus")
                    {
                        $("#contents").load("about-us.html");
                    }else if(hashvalue=="#faq")
                    {
                        $("#contents").load("faq.html");
                    }else if(hashvalue=="contactus")
                    {
                        $("#contents").load("contact-us.html");
                    }else if(hashvalue=="gallery")
                    {
                        $("#contents").load("gallery.html",function(data){
                            //var output="<script type=\"text/javascript\">$(document).ready(function() {$('.resort-img').fancybox();}); </scrip> ";
                            // $("#gallerytab").html(output);
                        });             
                    }else if(hashvalue=="#register")
                    {
                        $("#contents").load("registration.jsp");
                    }
                }//end of window.location.hash
                
                
                $("#loginbutton").live("click",function(){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("login.jsp #loginsection");
                });
                
                $("#logoutbutton").live("click",function(){
                    $.post("LogoutServlet",function(data){
                        
                        $(window.location).attr('href',"client-home.jsp");
                    });
                });
                
                
                $("#viewpackages").click(function(){ 
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("package-list.jsp");
                    $.post("ViewPackageServlet",function(data){
                        //  alert("res:"+data);
                        var result=$.parseJSON(data);//this converts string to json
            
                        var output="<br><div class=\"resort-list\">";
                        output=output+"<h2>Currently Available Packages</h2>";
                        output=output+"<ul class=\"resort\">";
            
                        var noofpackage=countProperties(result);//alert("noofpackagecount:"+noofpackage);
                        for(var i=0;i<noofpackage;i++)
                        {
                            var packageid=result[i].packageid; //alert("Packageid"+packageid);
                            if(packageid !=0)
                            {    
                                output=output+"<li>";
                                output+="<div class=\"resort-heading\"><h3> Package : "+result[i].packagename;
                                output+="</h3><label> Duration : " + result[i].packageduration+ "Days";
                                output+="</label><a href=\"#\" class=\"book-now\" id=\"bookbtn"+packageid+"\" onclick=booknow("+packageid+")>Book Now</a>";
                                output+="<div class=\"clearfix\"></div>";
                                output+="</div>";
                                
                                output+="<div class=\"resort-details\">";
                                output+="<p>";
                       
                    
                                    
            
                   
                                var noofroomstypes=countProperties(result[i].roomtype);
                                if(noofroomstypes!=0)
                                {
                                    for(var j=0;j<noofroomstypes;j++)
                                    {
                                        var roomtypename=result[i].roomtype[j].roomtype.roomtype;//alert("roomtype:"+roomtypename);
                                        var noofrooms = result[i].roomtype[j].noofrooms;//alert("noofrooms"+noofrooms);
                                        output+="<h4 class=\"room-type\">"+roomtypename+ " : " + noofrooms +"</h4>";
                                    }
                                }
                                output+="</p>";
                                var noofaddons=countProperties(result[i].addonid); 
                                if(noofaddons!=0)
                                {
                                    for(var j=0;j<noofaddons;j++)
                                    {
                                        var addonname=result[i].addonid[j].AddonName;//alert("addonname"+addonname);
                                    }
                                }
                            }
                           
                            output+="</li>";
                        }
                        output+="</ul></div>";
                
                        $("#viewpackagelist").html(output);
                    });              
                    
              
                });//end of viewpackages function
                
                //$('#date-picker').live("datepicker",function(){ 
               
                //   dateFormat: "yy-mm-dd",changeMonth: "true",changeYear: "true",minDate: 'new Date()' +1,maxDate: '+90d'});
                
                
                $("#viewevents").click(function(){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("event-list.jsp", function(){
                        $.post("ViewEventServletClient",function(data){
                        
                            var result=$.parseJSON(data);
                            var count=countProperties(result);
                        
                            var output;
                            output+="<div class=\"resort-list\">";
                            output+="<h2 class=\"title\">Upcoming Events</h2><ul class=\"resort\">";
                        
                            for(var i=0;i<count;i++)
                            {
                                output+="<li>";
                                output+="<div class=\"event-heading\" id=\"eventbookingdiv\"><h3>"+result[i].eventname+"</h3><a href=\"#clienteventbooking\" class=\"book-now\" onclick=bookEvent("+result[i].eventid+")>Buy Passes Now</a><div class=\"clearfix\"></div></div>";
                                
                                output+="<div class=\"grid_3 omega\"><p><img src=\"siteimages/"+result[i].eventname+"_"+result[i].imagepath+"\" height=70 width=70 alt=\"resort-image\" /></p></div>";
                                
                                output+="<div class=\"grid_13 alpha resort-details\">";
                                output+="<h4 class=\"alignright\">Date : "+result[i].eventdate+"</h4> <h4 class=\"alignleft\">Venue : "+result[i].eventplace+" </h4><br/><br/>";
                                output+="<div class=\"clearfix\"></div>";
                                output+="<p>"+result[i].eventdescription+"</p>";
                                output+="</div>";
                                
                                output+="</li>";
                            }
                            output+="</ul></div>";
                        
                            $("#clientvieweventlist").html(output);
                        });//end of view event servlet
                    });
                    
                    
                });// end of view events function
                
               
                $("#aboutus").click(function(event){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("about-us.html");
                });
                
                $("#gallery").click(function(event){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("gallery.html",function(data){
                        //var output="<script type=\"text/javascript\">$(document).ready(function() {$('.resort-img').fancybox();}); </scrip> ";
                        // $("#gallerytab").html(output);
                    });
                    
                });
                
                $("#faq").click(function(event){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("faq.html");
                });
                
                $("#contactus").click(function(event){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("contact-us.html");
                });
        
        
                $("#register").live("click",function(){
                    document.getElementById("homepageslider").style.display="none";
                    $("#contents").load("registration.jsp");
                });
                
                $("#membershiplist").click(function(event){
                    document.getElementById("homepageslider").style.display="none";
                    $.post("ClientViewServlet",function(data){
                       
                        $("#contents").html(data);
                    });
                });
                
                $("#registersavebutton").live("click",function(event){
                    
                                       
                    var firstname=document.getElementById("first-name").value;
                    var lastname=document.getElementById("last-name").value;
                    var pass=document.getElementById("password").value;
                    var email=document.getElementById("email").value;
                    var mno=document.getElementById("mobile").value;
                    var lno=document.getElementById("landline").value;
                    var address=document.getElementById("address").value;
                    var area=document.getElementById("area").value;
                    var city=document.getElementById("city").value;
                    var state=document.getElementById("state").value;
                    var country=document.getElementById("country").value;
                    var pincode=document.getElementById("pincode").value;
                    var dob=document.getElementById("dob").value;
                    var gender=document.getElementById("gender").value;
                    
                    var datastring="first-name="+firstname+"&last-name="+lastname+"&password="+pass+"&email="+email+"&mobile="+mno+"&landline="+lno+"&address="+address+"&area="+area+"&city="+city+"&state="+state+"&country="+country+"&pincode="+pincode+"&dob="+dob+"&gender="+gender;
                    
                    //alert("data:"+datastring);
                    
                    $.post("AddUserServlet",datastring,function(data){
                        // alert(data);
                    });
                });
                
                
            });//end of document.ready function
            
			
            // Function Called when Client clicks on the Booknow button from the list of packages
            function booknow(id)
            {
                
                $.post("PackageArrivalDate",{"package" : id},function(data){
                    
                    $("#contents").html(" ");
                    $("#contents").html("<div id=\"packagebooking\"></div> ");
                                  
                    
                    var result=$.parseJSON(data);//this converts string to json  
                        
                    var output="<div class=\"resort-list\">";
                    output+="<div class=\"resort-heading\">"
                    output+="<h3>Package:" + result.packagename+"</h3>";
                    output+="<div class=\"clearfix\"></div>";
                    output+="</div>" ; 
                    output+="<script type=\"text/javascript\">$(\'#date-picker\').datepicker({dateFormat: \"yy-mm-dd\",changeMonth: true,changeYear: true,minDate: \'new Date()\' +1,maxDate: \'+90d\'});<\/script>";
                
                    output+="<div class=\"resort-details\">";
                
                    output+="<p>";
                    var noofroomstypes=countProperties(result.roomtype);
                    price=result.packageprice;
                    pnm=result.packagename;
                    if(noofroomstypes!=0)
                    {
                        for(var j=0;j<noofroomstypes;j++)
                        {
                            var roomtypename=result.roomtype[j].roomtype.roomtype;//alert("roomtype:"+roomtypename);
                            var noofrooms = result.roomtype[j].noofrooms;//alert("noofrooms"+noofrooms);
                            output+="<h4 class=\"room-type\">"+roomtypename+ " : " + noofrooms +"</h4>";
                        }
                    }
                    output+="<h4 class=\"room-type\">Number Of Persons :" + result.idealsize +"</h4>";
                    output+="<h4 class=\"room-type\">Duration :"+result.packageduration+"</h4>";
                    idealsize=result.idealsize;                
                    duration=result.packageduration;
                    output+="</p> <p> <form>";
                                  
                    output+="<label>Select Arrival Date : </label><input  type=\"date\" id=\"date-picker\" />";
                           
                    output+="<input type=\"submit\" value=\"Check Availability\" onclick=checkroom("+result.packageid+","+ result.packageduration + ") />";
                  
                    output+="</form></p>";
                    output+="<div class=\"grid_13 alpha resort-details\">";
                    output+="<h4>Facilities</h4>";
                    output+="<ul class=\"facility\">";
                        
                    var noofaddons=countProperties(result.addonid); 
                    if(noofaddons!=0)
                    {
                        for(var j=0;j<noofaddons;j++)
                        {
                            var addonname=result.addonid[j].AddonName;
                            output+="<li>"+addonname+"</li>";
                        }
                    }
                    output+="</ul></div>";
                    output+="</div><div class=\"clearfix\"></div>";
                    document.getElementById("packagebooking").innerHTML=output;
                   
                });
            }
            
            function bookEvent(id)
            {
                $("#contents").load("event-booking.jsp",function(data1){
                    var datastring="event="+id;
                    $.post("SelectEditEventServlet",datastring,function(data){ 
                        var result=$.parseJSON(data);//this converts string to json
                        //alert(result.eventname);
                    
                        var output;
                    
                    
                        output="<div class=\"resort-list\">";
                        output+="<ul class=\"resort\">";
                        output+="<li>";
                    
                        output+="<div class=\"event-heading\">";
                        output+="<h3>"+result.eventname+"</h3><label class=\"center\">Date : "+result.eventdate+"</label><div class=\"clearfix\"></div>";
                        output+="</div>";
                    
                        output+="<div class=\"alignleft\"><p><img src=\"siteimages/"+result.eventname+"_"+result.imagepath+"\" height=70 width=70 alt=\"resort-image\" /></p></div><!--/.grid_3-->";
                    
                        output+="<div class=\"resort-details\">";
                        output+="<div class=\"grid_9\"><h4>Venue : "+result.eventplace+" </h4<h4>Normal Pass : "+result.ecopassprice+" Rs</h4></div>";
                        output+="<div class=\"grid_4\"><h4>Time : "+result.eventtime+" Hours</h4><h4> VIP Pass : "+result.vippassprice+" RS</h4></div>";
                        output+="</div><br />";
                    
                        output+="<div class=\"event-form\">";
                        output+="<form id=\"\" name=\"\" class=\"stylish-form\" action=\"post\">";
                        output+="<legend>Buy Passes</legend>";
                        output+="<fieldset>";
                    
                        output+="<div class=\"alignright\"><label>No. Of VIP Passes: </label><input type=\"number\" id=\"vippasses\" value=0 />";
                        output+="<input type=\"button\" value=\"Buy Passes\" onclick=bookEventCheckAvailability("+result.eventid+") /></div>";
                        output+="<div class=\"alignleft\"><label>No. Of Normal Passes: </label><input type=\"number\" id=\"ecopasses\" value=0 /></div>";
                    
                        output+="<div id=\"checkstatus\"></div>";
                    
                        //<!--show the status here that this much tickets not available if provided number of tickets are not available-->
                        //<!--If available, then display total tickes and the total price hereonly in some label or anything and give a button( this will be replaced by paypal Button) to proceed further -->
                        output+="</fieldset>";
                        output+="</form>";
                        output+="</div>";
                    
                        output+="<div><p>"+result.eventdescription+"</p></div>";
                    
                        output+="<div class=\"clearfix\"></div>";
                    
                        output+="</li>";
                        output+="</ul>";
                        output+="</div><!--/.resort-list-->";
                    
                    
                        $("#clienteventbookdetails").html(output);
                    });
                });
                
            }// end of function bookEvent
            
            function bookEventCheckAvailability(id)
            {
                var vippassesneeded=document.getElementById("vippasses").value;
                var ecopassesneeded=document.getElementById("ecopasses").value;
                if(vippassesneeded=="")
                    return;
                if(ecopassesneeded=="")
                    return;
	 
                var datastring="vippassesneeded="+vippassesneeded+"&ecopassesneeded="+ecopassesneeded+"&event="+id;
	 
                $.post("BookEventCheckAvailibility",datastring,function(data){
                    //alert("jawab="+data);
		
                    if(data!=1)
                    {
                        $("#checkstatus").html(data);
                            
                    }else
                    {
                        var datastring="vippassesneeded="+vippassesneeded+"&ecopassesneeded="+ecopassesneeded+"&event="+id;
			
                        $.post("EventCheckLoginClient",datastring,function(data){
                        
                            $(window.location).attr('href',data);
				
                            if(window.location.hash)
                            {
                                var hashvalue=window.location.hash;
                                // alert("hashvalue:"+hashvalue);
					
                                if(hashvalue=="#loginpage")
                                {
                                    $("#contents").load("login.jsp #loginsection");
                                }else 
                                { 
                                    //if(("#contents").load("event-booking.jsp ").length<=0)
                                    // $("#contents").load("event-booking.jsp");
                                
                                    $.post("CheckIfMemberServlet",function(data1){
                                        // alert("Is MEMBER"+data1);
							
                                        datastring="membership="+data1;
                                        $.post("EventBookingFinalAmount",datastring,function(amount){
                                            // alert("Amount="+amount);
										
                                            $("#contents").load("event-booking-final-amount.jsp",function(d){
                                                var output;
                                                var datastring="event="+id;
                                                $.post("SelectEditEventServlet",datastring,function(data){ 
                                                    var result=$.parseJSON(data);//this converts string to json
                                                    //alert(result.eventname);
                    
                                                                
                                                    output="<div id=\"eventbookingfinalamount\">";
                                                    output+="<div class=\"resort-list\">";
                                                    output+="<ul class=\"resort\">";
                                                    output+="<li>";
                    
                                                    output+="<div class=\"event-heading\">";
                                                    output+="<h3>"+result.eventname+"</h3><label class=\"center\">Date : "+result.eventdate+"</label><div class=\"clearfix\"></div>";
                                                    output+="</div>";
                    
                                                    output+="<div class=\"alignleft\"><p><img src=\"siteimages/"+result.eventname+"_"+result.imagepath+"\" height=70 width=70 alt=\"resort-image\" /></p></div><!--/.grid_3-->";
                    
                                                    output+="<div class=\"resort-details\">";
                                                    output+="<div class=\"grid_9\"><h4>Venue : "+result.eventplace+" </h4<h4>Normal Pass : "+result.ecopassprice+" Rs</h4></div>";
                                                    output+="<div class=\"grid_4\"><h4>Time : "+result.eventtime+" Hours</h4><h4> VIP Pass : "+result.vippassprice+" RS</h4></div>";
                                                    output+="</div><br />";
                    
                                                    output+="<div class=\"event-form\">";
                                                    output+="<form id=\"\" name=\"\" class=\"stylish-form\" action=\"post\">";
                                                    output+="<legend>Total Amount="+amount+"</legend>";
                                                    output+="<fieldset>";
                    
                                                    output+="<div class=\"alignright\">";
                                                    output+="<input type=\"button\" value=\"Buy Passes\" onclick=eventBookPayment("+amount+","+id+") /></div>";
                                                
                    
                                                    //<!--show the status here that this much tickets not available if provided number of tickets are not available-->
                                                    //<!--If available, then display total tickes and the total price hereonly in some label or anything and give a button( this will be replaced by paypal Button) to proceed further -->
                                                    output+="</fieldset>";
                                                    output+="</form>";
                                                    output+="</div>";
                    
                                                    output+="<div><p>"+result.eventdescription+"</p></div>";
                    
                                                    output+="<div class=\"clearfix\"></div>";
                    
                                                    output+="</li>";
                                                    output+="</ul>";
                                                    output+="</div><!--/.resort-list-->";
                                                    output+="</div>";
                    
                                                    $("#eventbookingfinalamount").html(output);
                                                
                                        
                                               
                                                });//end of select edit event servlet
                                            });
                                            
                                                        
                                                        
                                                        
                                                
										
                                        });//end of event booking final amount
                                    });//end of if client is member or no
                                }//end of else
                            }//end of if window.hash
                        });
                    }
		
                });
            }
            
            function eventBookPayment(amount, eventid)
            {
                var output="<h2>Proceeding Toward Payment...</h2><br/>";
                output+="<h3>Amount="+amount+" </h3>";
                
                $("#contents").html(output);
            }
            
            function membershipSubscribe(id)
            {
                var datastring="id="+id;
                $.post("MemberBooking",datastring,function(data){
                    // alert("data"+data);
                    $("#contents").html(data);
                });
            }
			
            // This function is called when CheckAvailablity of rooms 
            function checkroom(pkgid,dur)
            {
                      
                var adate=document.getElementById("date-picker").value;
                
                pid=pkgid;
                checkindate=adate;
                $.post("CheckPkgRoomServlet",{"package" : pkgid, "adate" :  adate, "dur" : dur},function(datar){
                                   
                    // alert("Available= " + datar);
                    //var statusavailable=true;
                    //statusavailable=datar;
                    
                    
                    checkoutdate=datar.substring(0, 10 );
                    if(datar.search("true")!=-1)
                    {    
                        $.post("SelectAddonServlet",function(data1){
                            var result=$.parseJSON(data1);    
                        
                                
                            $("#contents").html(" ");
                            $("#contents").html("<div id=\"addonsbooking\"></div> ");
                      
                   
                            var  output="<div class=\'addonstitle\'>";
                            output+="<h3>Select Addons</h3>";
                            output+="<div class=\"clearfix\"></div></div>";
                
                            output+="<div id=\"addon-selection\">";
                            output+="<div id=\"package-price\">";
                            output+="<h3> Selected Package : "+pnm+" <span align=\"right\" class=\"alignright\">"+price+" Rs.</span></h3>";
                       
                            output+="</div>";

                            output+="<form>";
                            output+="<div class=\"grid_9\">";
                            output+="<h4>Room Addons</h4>";
                    
                            var nradd=countProperties(result[0]);
                            var npadd=countProperties(result[1]);
                    
                            output+="<p><label id='lradd' style='display: none;' >" + nradd + "</label>"; 
                            output+="<p><label id='lpadd' style='display: none;' >" + npadd + "</label>"; 
                    
                            for( var i=0;i<nradd;i++)
                            {    
                                output+="<p><input type=\"checkbox\" name=\"room-addons\" id='rid" +i + "'/>" +result[0][i].AddonName + " : " + result[0][i].AddonPrice +" Rs</p>";
                                output+="<p><label id='lr" +i + "' style='display: none;' >" +  result[0][i].AddonPrice + " </label> </p>";
                            }
                            output+="</div>";     
                            output+="<div class=\"grid_6\">";
                            output+="<h4>Personal Addons</h4>";
                    
                            for(i=0;i<npadd;i++)
                            {
                                output+="<p><input type=\"checkbox\" name=\"person-addons\"  id='pid" + i + "'/>" +result[1][i].AddonName + " : " + result[1][i].AddonPrice + "</p>";
                                output+="<p><label id='lp" +i + "' style='display: none;' >" +  result[1][i].AddonPrice + " </label> </p>";
                            }    
                    
                            output+="<br/>";
                            output+="<p><label>No. Of Persons :</label>";
                            output+="<select id=\"persons\" name=\"persons\" >";
                            i=0;
                            while(i<idealsize)
                            {
                        
                                output+="<option value=\""+ i +  " \">" + i + "</option>";
                                i++;
                            }                        
                        
                            output+="</select></p></div>";
                            output+="<div class=\"clearfix\"></div>";       
                            output+="<br/>";    
                            output+="<div class=\"textalignright\">";
                            output+=" <input type=\"button\" value=\"Add addons & Proceed\" onclick='addnproceed();'/><input type=\"button\" class=\"margin-left-10\" value=\"Proceed without adding Addons\" onclick='onlyproceed();' />";    
                            output+="</div></form></div>"; 
                            document.getElementById("addonsbooking").innerHTML=output;
                    
                        
                        }); //end of selectaddonsservlet */
                    }
                    else
                    {
                        alert("Package is not available during this dates. \nPlease Try again");
                        
                                             
                    } 
                });  //end of chekpkgroomservlet              
            }            
            
               
            function addnproceed()
            {
                var nor=Number(document.getElementById("lradd").innerHTML);
                var nop=Number(document.getElementById("lpadd").innerHTML);
                var j;
                var total=0
                for(i=0;i<nor;i++)
                {
                    j="rid"+i;
              
                    if(document.getElementById(j).checked == true)
                    {
                        total+=Number(document.getElementById("lr"+i).innerHTML);
                    }    
               
             
                }  
          
                for(i=0;i<nop;i++)
                {
                    j="pid"+i;
                    
                    if(document.getElementById(j).checked == true)
                    {
                        total += Number(document.getElementById("lp"+i).innerHTML) * Number(document.getElementById("persons").value * duration )  ;
                    }    
                }    
          
                var x= confirm(" Total Addons Price : " + total  + "\n Do you want to proceed ?" );
                var finalp;
                if(x)
                {
                    finalp=price+total;
                    alert("Final : " + finalp);
                }   
                else
                {
                    total=0;
                }    
                // alert("Package id  : " + pid  + "Package price : " + finalp + "Checkin date : " + checkindate + "Check outdate :" + checkoutdate );
               
                $.post("BookPackageServlet",{"pid" : pid, "idate" :  checkindate, "odate" : checkoutdate},function(datar){
                    //  String s=$.parseJSON(data);
                    //  alert(datar);
                });
             
            }
               
                
                
          
          
            function onlyproceed()          
            {
                var finalp=price;
                // alert("Package id  : " + pid  + "Package price : " + finalp + "Checkin date : " + checkindate + "Check outdate :" + checkoutdate );   
                
            }
    
        </script>

    </head>
    <body>

        <div id="header">
            <div class="container_24">
                <div class="grid_24">
                    <div class="grid_12 omega" id="logo">
                        <a href="#"><span>Prime Resort</span></a>
                    </div><!--/.grid_12-->

                    <div class="grid_12 alpha" id="secondary-nav">

                        <div id="loginLogout">

                        </div>
                    </div>
                </div><!--/.grid_24-->


                <div class="clearfix"></div>
                <div id="primary-nav" class="grid_24">
                    <ul>
                        <li><a href="client-home.jsp">Home</a></li>
                        <li><a href="#">Rooms</a></li>
                        <li><a href="#viewpackages" id="viewpackages">Packages</a></li>
                        <li><a href="#membershiplist" id="membershiplist" >Membership</a></li>
                        <li><a href="#viewevents" id="viewevents">Events</a></li>
                        <li><a href="#register" id="register">Register</a></li>

                        <li><a href="#aboutus" id="aboutus">About Us</a></li>
                        <li><a href="#gallery" id="gallery">Gallery</a></li>
                    </ul>
                </div><!--/#primary-nav-->
                <div class="clearfix"></div>
            </div><!--/.container_24-->
        </div><!--/#header-->

        <!--image slider-->
        <div class="slider-wrapper theme-default" id="homepageslider">
            <div id="slider" class="nivoSlider">
                <img src="resort-images/home-1.jpg" data-thumb="resort-images/home-1.jpg" alt="" />
                <img src="resort-images/home-2.jpg" data-thumb="resort-images/home-2.jpg" alt="" />
                <img src="resort-images/home-3.jpg" data-thumb="resort-images/home-3.jpg" alt="" />
                <img src="resort-images/home-4.jpg" data-thumb="resort-images/home-4.jpg" alt="" />

            </div>
        </div>


        <div id="main" class="container_24">
            <div id="contents" class="grid_17">
                <div class="box">

                    <h2 class="title">About Prime Resort</h2>

                    <p>
                        Aliquam erat volutpat. Proin feugiat tincidunt pellentesque. Vestibulum lobortis, magna ac aliquet ullamcorper, eros dolor dictum nisl, id sagittis est orci accumsan nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras et dolor vel urna lacinia posuere aliquam et augue. Vestibulum dictum justo nec dui accumsan porttitor. In nec lorem in augue lacinia porttitor ac at quam. Cras consequat rhoncus sem vel consequat.</p>
                    <p>Fusce libero nulla, hendrerit in tincidunt a, lacinia ac ipsum. Vestibulum quis mattis augue. Maecenas sit amet tempor mi. Nunc hendrerit leo sed lorem elementum consequat. Aliquam porta dui a mi congue auctor. Donec velit lorem, tristique eu vehicula molestie, ultrices sed urna. Phasellus quis purus sem, vitae ultricies elit. Aenean id erat sapien. In vehicula cursus ipsum, eu pretium est convallis ut. Maecenas eu pulvinar nisl. Curabitur luctus tincidunt nibh. Ut sed est ac odio congue tristique. Aenean quis lorem risus. Curabitur sed venenatis nibh. Nunc commodo euismod sapien ac placerat. Vestibulum ac sem vitae dui elementum placerat. 
                    </p>
                </div>

            </div><!--/.contents-->
            <div id="sidebar" class="grid_7">

                <div class="sidebar">
                    <h2>Information</h2>

                    <ul class="sidebar-links">
                        <li><a href="#faq" id="faq">FAQ</a></li>
                        <li><a href="#">Terms & Conditions</a></li>
                        <li><a href="#">Cancellation Policy</a></li>
                        <li><a href="#contactus" id="contactus">Contact Us</a></li>
                    </ul>

                </div><!--/.sidebar-->

                <div class="sidebar">
                    <h2>Upcoming Events</h2>

                    <div id="sidepanel">
                        <ul class="sidebar-links">
                            <li><a href="#faq" id="faq">FAQ</a></li>
                            <li><a href="#">Terms & Conditions</a></li>
                            <li><a href="#">Cancellation Policy</a></li>
                            <li><a href="#contactus" id="contactus">Contact Us</a></li>
                        </ul>
                    </div>
                </div><!--/.sidebar-->


            </div><!--/#sidebar-->
        </div> <!--/#main-->
        <div class="clearfix"></div>
        <div id="footer" class="container_24">
            <div id="footer-nav" class="grid_24">
                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">Rooms</a></li>
                    <li><a href="#">Packages</a></li>
                    <li><a href="#">Membership</a></li>
                    <li><a href="#">Events</a></li>
                    <li><a href="#">Register</a></li>
                    <li><a href="#">Contact Us</a></li>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">FAQ</a></li>
                </ul>
            </div><!--/#footer-nav-->
            <div class="grid_14">
                <p>Copyright © Prime Resort. All Rights Reserved.</p>
            </div>
            <div class="grid_10 ">


            </div>
        </div><!--/#footer-->
        <script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
            $(window).load(function() {
                $('#slider').nivoSlider({
                    effect: 'sliceUp', // Specify sets like: 'fold,fade,sliceDown'
                    slices: 10, // For slice animations
                    animSpeed: 1000, // Slide transition speed
                    pauseTime: 4000, // How long each slide will show
                    startSlide: 0, // Set starting Slide (0 index)
                    directionNav: false, // Next & Prev navigation
                    controlNav: false, // 1,2,3... navigation
                    controlNavThumbs: false, // Use thumbnails for Control Nav
                    pauseOnHover: true, // Stop animation while hovering
                    manualAdvance: false, // Force manual transitions
                    randomStart: false // Start on a random slide
       
                });
            });
        </script>

    </body>
</html>
